<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../vue.js"> </script>
</head>
<body>
  <div id="app1">
    <h1>实例1</h1>
    <first-cmp></first-cmp>
  </div>
  <hr>
  <div id="app2">
    <h1>实例2</h1>
    <first-cmp></first-cmp>
  </div>
  <div id="app3">
    <h1>实例3</h1>
    <first-cmp></first-cmp>
  </div>


  <script>

    new Vue({
      el: "#app3", 
    })
   // 所有在全局组件后面的实例化都可以用
    Vue.component("FirstCmp",{
       template: "<h1>全局组件</h1>", 
    })

    new Vue({
      el: "#app1", 
    })

    new Vue({
      el: "#app2", 
    })

    


  </script>
</body>
</html>